package com.woniuxy.car.boss.client;

import com.woniuxy.car.boss.param.service.BossAddService;
import com.woniuxy.car.common.resultcode.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(contextId = "serviceBossClient",name="boss")
public interface ServiceBossClient {

    /**
     * 搜索多个服务，为空则返回所有
     * @return
     */
    @GetMapping("/getAllServiceCategory")
    public Result getAllServiceCategory();

    /**
     * 根据ID搜索多个服务
     * @param serviceId
     * @return
     */
    @GetMapping("/searchService")
    public Result searchService(@RequestParam("serviceId") List<Integer> serviceId);

    /**
     * 新增服务
     * @param addService
     * @return
     */
    @PostMapping("/addService")
    public Result addService(@RequestBody BossAddService addService);


}
